// pages/fraternity/detail/components/content/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    id: { type: String, value: '' },
    info: { 
      type: Object, value: () => ({}),
      observer( newValue, oldValue ) {
        const { presidentStudentId, vicePresidentStudentId } = newValue;
        const studentid = wx.getStorageSync('studentid');
        if([presidentStudentId, vicePresidentStudentId].includes(studentid)) {
          this.setData({ isShowManageBtn: true });
        }
      }
    },
    memberList: { type: Array, value: () => ([]) },
    total: { type: Number, value: 0 }
  },

  /**
   * 组件的初始数据
   */
  data: {
    isShowManageBtn: false
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onClick() {
      this.triggerEvent('click');
    },
    onJump( event ) {
      const { url } = event.currentTarget.dataset;
      console.log(url);
      wx.navigateTo({ url }) 
    }
  }
})
